<?php
session_start();

$prefix_url = "/";
global $lg;
$lg = $_SESSION['lg'];
if($lg=="en")
	$prefix_url = "/en/";
	
include("../language/$lg.php");
	
header("Content-Type: text/html; charset=utf-8"); 
define('CLASS_DIR','../class/');
include('../includes/config.php');
include('../includes/functions.php');

global $db;

$id = $_GET['id'];

if(!is_numeric($id))
	die("don't hack me :D");

$sql = "select * from products where id=$id";
$product = $db->getRow($sql);
if($product){ 
?>
<div class="col1">
	<p><a id="example5" href="/<?php echo $product['img']; ?>" title="<?php echo $product['name_'.$_SESSION['lg']]; ?>"><img src="/<?php echo $product['img']; ?>" alt="<?php echo $product["name_$lg"]; ?>" /></a></p>
</div>
<div class="col2">
	<div>
		<span><?=TenSP?></span> <?php echo $product["name_$lg"]; ?>
	</div>
	<div>
		<span><?=MaSanPham?></span> <?php echo $product['code']; ?>
	</div>
	<div>
		<span><?=NSX?></span> <?php echo $product["production_$lg"]; ?>
	</div>
	<div>
		<span><?=KichThuoc?></span> <?php echo $product['size']; ?>
	</div>
	<?php /*?><div>
		<span><?=BH?></span> <?php echo $product['warranty_'.$_SESSION['lg']]; ?> &nbsp;
	</div><?php */?>
	<div>
		<span><?=UngDung?></span> <?php echo $product["descs_$lg"]; ?> &nbsp;
	</div>
	<div class="bottom"><a href="/lien-he.html"><?=LienHe?></a></div>
</div>
<?php	}	?>
